package org.xx.sipahi;

import java.util.Date;
import java.util.Objects;

/**
 * 介绍
 */
public final class Presentation
        extends AbstractPage {
    public Presentation(
            Long id
    ) {
        this(id, "", null, "", "", "", null, "", null, DRAFT, "");
    }

    public Presentation(
            Long id,
            String title,
            Category category,
            String keywords,
            String brief,
            String creator,
            Date createTime,
            String updater,
            Date lastModifiedTime,
            int status,
            String content
    ) {
        super(id, title, category, keywords, brief, creator, createTime, updater, lastModifiedTime, status, content);
    }

    @Override
    public final int hashCode() {
        return Objects.hashCode(this.getId());
    }

    @Override
    public final boolean equals(
            Object o
    ) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        final Presentation other = (Presentation) o;
        return Objects.equals(this.getId(), other.getId());
    }

    @Override
    public final String toString() {
        return "Presentation(id=" + this.getId() + ",title=" + this.getTitle() + ")";
    }
}
